<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=0, initial-scale=1.0">
  <title>数据检测</title>
</head>

<body>
  <script>
    var n1 = 100
    var result = typeof n1
    console.log(result)//number
    // 在控制台查数据类型

    var s1 = 'hello world'
    var result = typeof s1
    console.log(result)//string

    var b1 = true
    var result = typeof b1
    console.log(result)//boolean

    var k1
    var result = typeof k1
    console.log(result)//undefined

    var k2 = null
    var result = typeof k2
    console.log(result)//object
  </script>
</body>

</html>